﻿<nav class="wyjcontainer_H">
    <div class="wyjcontainer_H">
        <strong class="logo">库存管理系统</strong>
    </div>
    <div class="wyjcontainer_H">
        <div>

        </div>
        <a href="/Notification"><i class="fa fa-bell-o"></i></a>

        <div class="dropdown">
            <span class="username">你好！@(Model.LoginId ?? "游客")</span>
            <ul class="dropdown-content">
                <li class="dropdown__item" @@click="ChangePwd">
                    <a>修改密码</a>
                </li>
                <li class="dropdown__item" @@click="logout">
                    <a>退出登录</a>
                </li>
            </ul>
        </div>
    </div>
</nav>
<script type="text/javascript">
    var nav = new Vue({
        el: 'nav',
        data: {
            menus: [],
        },
        methods: {
            logout() {
                Ajax.get("/api/user/logout", function (res) {
                    console.log(res);
                    when(res.IsSuccess, () => window.location.href = "/Login");
                });
            },
            ChangePwd() {
                alert("演示项目，无须密码");
            }
        }
    });
</script>

